package com.zsr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author zsr
 * @Description 处理乱码
 * @Date 2021/4/29 10:15
 */
@Controller
public class EncodingController {

    //post乱码问题 get无乱码
    @PostMapping("/e/t1")
    public String test1(@RequestParam("name") String name, Model model){
        System.out.println(name);
        model.addAttribute("msg",name);
        return "test";
    }
}
